﻿@model IEnumerable<AuthorizationSample.Data.Document>

@{
    ViewData["Title"] = "文档列表";
}

<h2>@ViewData["Title"]</h2>

<p>
    <a asp-action="Create">创建</a>
</p>
<table class="table">
    <thead>
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.Id)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Title)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Creator)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.CreationTime)
            </th>
            <th></th>
        </tr>
    </thead>
    <tbody>
        @foreach (var item in Model)
        {
            <tr>
                <td>
                    @Html.DisplayFor(modelItem => item.Id)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Title)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Creator)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.CreationTime)
                </td>
                <td>
                    <a asp-action="Edit" asp-route-id="@item.Id">编辑</a> |
                    <a asp-action="Details" asp-route-id="@item.Id">详细</a> |
                    <a asp-action="Delete" asp-route-id="@item.Id">删除</a>
                </td>
            </tr>
        }
    </tbody>
</table>
